package me.goldze.mvvmhabit.http;




/**
 * 业务返回的固定字段
 * @param <T>
 */
public class BaseResponse<T> {
    private int code;
    private String message;
    private T body;

    /**
     * 服务器时间
     */
    private Long now;

    public boolean isOk() {
        return code ==200;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }

    public Long getNow() {
        return now;
    }

    public void setNow(Long now) {
        this.now = now;
    }
}
